//
//  BaseTabBarController.m
//  Travelling
//
//  Created by lanou on 15/12/16.
//  Copyright © 2015年 Morrrah. All rights reserved.
//

#import "BaseTabBarController.h"
#import "MainClassTableViewController.h"

@interface BaseTabBarController ()

@end

@implementation BaseTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    MainClassTableViewController *mainClassTableViewVC = [[MainClassTableViewController alloc]initWithStyle:UITableViewStylePlain];
    [self addChildViewController:mainClassTableViewVC title:@"推荐" imageName:@""];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)addChildViewController:(UIViewController *)childController title:(NSString *)title imageName:(NSString *)imageName
{
    UINavigationController *naVC = [[UINavigationController alloc]initWithRootViewController:childController];
    naVC.tabBarItem.title = title;
    naVC.tabBarItem.image = [UIImage imageNamed:imageName];
    [self addChildViewController:naVC];
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
